import sbt.Keys._
import sbt._

object ServerUtil extends Build {
//  lazy val startServer = taskKey[Unit]("start server")
//  lazy val stopServer = taskKey[Unit]("stop server")
//  lazy val sampleIntTask = taskKey[Int]("A sample int task.")
//
////  override lazy val settings = super.settings ++
////    Seq(
////      sampleKeyA := "A: in Build.settings in Build.scala",
////      resolvers := Seq()
////    )
//
//  lazy val sbtTutorialLib = Project(id = "hello",
//    base = file("."),
//    settings = Seq(
//      name := "sbtTutorialLibScala",
//      sampleIntTask := {
//        startServer
//        try {
//          val sum = 1 + 2
//          println("sum: " + sum)
//          sum
//        } finally {
//          stopServer
//        }
//      }
//    ))
//
//
//  def startServer(): Unit = {
//    println("starting...")
//    Thread.sleep(500)
//  }
//
//  def stopServer(): Unit = {
//    println("stopping...")
//    Thread.sleep(500)
//  }
//
////  def sampleIntTask(): Int = {
////    ServerUtil.startServer()
////    try {
////      val sum = 1 + 2
////      println("sum: " + sum)
////      sum
////    } finally {
////      ServerUtil.stopServer()
////    }
////  }
}